<?php

/*
  | --------------------------------------------------------------------------------------------------
  | <sedes>
  |
  | Desenvolvedor:	Eduardo Sirangelo
  | E-mail:		sirangelos@ibest.com.br
  | Descrição:
  |	-
  | Quality is Everyting
  | --------------------------------------------------------------------------------------------------
 */
?>
<script type="text/javascript">			
	$(document).ready(function(){
	//Corner Setting for IE8
	$("#pagetitle-wrapper").corner("8px");	
			
	// Portfolio Setting
	$('#controls a').click(function(){	
	var r = $(this).attr('rel');	
	var c = $('#portfolio').attr('class');	
	if (r != c) {
			$('#controls a').removeClass('active');
			$(this).addClass('active');
			$('#portfolio').fadeOut(100, function(){
			$('#portfolio').removeAttr('class');
			$('#portfolio').addClass(r);
			$('#portfolio').fadeIn(100);							
			});				
			}					
		});				
	});		

	//Colorbox Jquery
	$(document).ready(function(){				
		$("a[rel='portfolio']").colorbox({transition:"fade"});				
		$(".login").colorbox({width:"400px"});				
	});

    // Background Slide Setting    
	var scrollSpeed = 50; // speed in milliseconds	
	var current = 0; // set the default position	
	var direction = 'h'; // set the direction
	function bgscroll(){
	    current -= 1;  
	    $('div#glow-bg-inner').css("backgroundPosition", (direction == 'h') ? current+"px 0" : "0 " + current+"px");   
	}
	 setInterval("bgscroll()", scrollSpeed);		
</script>

<div id="header-container-inner">
                	<div id="phone-number"><h3>777.888.5555</h3></div>
                    <div id="pagetitle-wrapper">
                    	<h1>Sedes.</h1>
                        <div id="breadcumb">
                        	Home &nbsp; &raquo; &nbsp; Sedes
                        </div>	
                    </div>
                    <div id="slideshow-shadow"></div>
                </div>

<div id="content">
                	
    <div class="maincontent">          	
                        
        <div id="top-content">
                <!-- begin of portfolio filter -->
            <ul id="portfolio-filter">
                <li><a href="#all" title="">Todos</a></li>
                <li><a href="#aj_renner" title="" rel="aj_renner">A.J. Renner</a></li>
                <li><a href="#assis_brasil" title="" rel="assis_brasil">Assis Brasil</a></li>                
            </ul>
                
        </div>

        <div class="col-1">
                <!-- begin of portfolio list -->
            <ul id="portfolio" class="icon">
                
                <?
                        
                $map    = directory_map('./public/images/sedes/aj_renner/', TRUE);
                $count  = 1;
                
                if($map) {

                    foreach($map as $key => $image) {  
                        
                        $pos = strpos($image,"_thumb");
                        
                        if(empty ($pos)) {
                            
                            $config['image_library']    = 'gd2';
                            $config['source_image']     = "./public/images/sedes/aj_renner/" . $image;
                            $config['create_thumb']     = TRUE;
                            $config['maintain_ratio']   = TRUE;
                            $config['width']            = 198;
                            $config['height']           = 202;

                            $this->image_lib->initialize($config); 
                            $this->image_lib->resize();

                            $thumb = pathinfo(base_url(). "public/images/sedes/aj_renner/" . $image);

                            ?>

                            <li class="aj_renner">

                                <div>

                                    <a href="<?=base_url()?>public/images/sedes/aj_renner/<?=$image?>" rel="portfolio" title="A.J. Renner <?=$count?>">
                                        <img src="<?=$thumb['dirname'] . "/" . $thumb['filename'] . "_thumb" . "." . $thumb['extension']?>" alt="" />
                                    </a>
                                    <h6>A.J. Renner <?=$count?></h6>

                                </div>

                            </li>

                        <?
                        $count++;
                        }
                    }
                }
                      
                $this->image_lib->clear();
                
                $map0   = directory_map('./public/images/sedes/assis_brasil/', TRUE);
                $count0 = 1;
                
                if($map0) {
                    
                    foreach($map0 as $key0 => $image0) {  
                        
                        $pos0 = strpos($image0,"_thumb");
                        
                        if(empty ($pos0)) {
                            
                            $config0['image_library']    = 'gd2';
                            $config0['source_image']     = "./public/images/sedes/assis_brasil/" . $image0;
                            $config0['create_thumb']     = TRUE;
                            $config0['maintain_ratio']   = TRUE;
                            $config0['width']            = 198;
                            $config0['height']           = 202;

                            $this->image_lib->initialize($config0); 
                            $this->image_lib->resize();

                            $thumb0 = pathinfo(base_url(). "public/images/sedes/assis_brasil/" . $image0);

                            ?>

                            <li class="assis_brasil">

                                <div>

                                    <a href="<?=base_url()?>public/images/sedes/assis_brasil/<?=$image0?>" rel="portfolio" title="Assis Brasil <?=$count0?>">
                                        <img src="<?=$thumb0['dirname'] . "/" . $thumb0['filename'] . "_thumb" . "." . $thumb0['extension']?>" alt="" />
                                    </a>
                                    <h6>Assis Brasil <?=$count0?></h6>
                                    
                                </div>

                            </li>

                        <?
                        $count0++;
                        }
                    }
                }
                ?>

            </ul>

        </div>
        
    </div>
                
</div>